package com.bjsxt.mapper;

import com.bjsxt.pojo.Role;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface RoleMapper {
    /*查询所有角色信息*/
    @Select("select * from t_role")
    List<Role> findMoer();
    //添加角色信息
    Integer insert( Role role);
   //修改角色
    @Update("update t_role set rname=#{rname}, rdesc=#{rdesc} where rid=#{rid}")
    Integer update(Role role);

    //删除角色的信息
    @Delete("delete from t_role where rid=#{param1}")
    Integer deleteRole(Integer rid);

}
